Author: Andrey Kovalenko
Posted: 1/15/2008 1:13:04 PM
Question: When I try to spellcheck in the Rich Text Editor I get the SpellingForm is null or not an object javascript error message. How can I fix this?
Answer: This is caused by the Strict value of the xhtmlConformance mode in your web.config.
This element makes some changes in the html on the website in order to satisfy the xhtml strict doctype. Information about the xhtml strict doctype can be found via the following link:
http://msdn2.microsoft.com/en-us/library/ms178159.html
When this entry is added to the web.config file, it makes minor adjustments to the generated html. The name attribute is illegal in the strict mode, so it is removed from the form element of the SpellCheck.html. In the /sitecore/shell/Editor/Spell.js file this name is used to reference the element. This fails because the name is missing.
To solve this problem, update the Spell.js file with the following code:
if(loadText())
document.SpellingForm.submit();
change to:
if(loadText())
{
var spellingForm = document.getElementById("SpellingForm");
spellingForm.submit();
}
Note: Make sure that you have cleaned the browser cache to use the updated script file for a spellcheck.
Prev Next